import _fetch from "./requst";

function getQuestion(params) {
  return _fetch({
    url: "/question/list",
    params,
  });
}

// 增加题库
function addQuestion(data) {
  return _fetch({
    url: "/question/add",
    method: "post",
    data,
  });
}
// 编辑题库
function editQuestion(data) {
  return _fetch({
    url: "/question/edit",
    method: "post",
    data,
  });
}

// 设置题库状态
function egetQuestionStatus(data) {
  return _fetch({
    url: "/question/status",
    method: "post",
    data,
  });
}

// 删除题库
function delQuestion(data) {
  return _fetch({
    url: "/question/remove",
    method: "post",
    data,
  });
}

export {
  getQuestion,
  addQuestion,
  editQuestion,
  egetQuestionStatus,
  delQuestion,
};
